package com.ating.demo.Mapper;

import cn.hutool.core.date.DateTime;
import com.ating.demo.Entity.Article;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ArticleMapper {

    List<Article> selectAll(Article article);

    Article selectById(Integer id);

    void insert(Article article);

    void updateById(Article article);

    @Delete("delete from article where id = #{id}")
    void moveById(Integer id);

    @Select("select count(*) from article where time like '%${date}%'")
    Integer selectCountByDate(String date);
}
